﻿namespace FlitBit.Proto
{
	/// <summary>
	///   Result of an attempt to decode a message.
	/// </summary>
	/// <typeparam name="TMessage">message type M</typeparam>
	public class DecodeMessageResult<TMessage>
	{
		/// <summary>
		///   Creates a new instance.
		/// </summary>
		/// <param name="kind">the kind</param>
		/// <param name="message">the message</param>
		public DecodeMessageResult(DecodeMessageResultKind kind, TMessage message)
		{
			Kind = kind;
			Message = message;
		}

		/// <summary>
		///   Gets the result's kind.
		/// </summary>
		public DecodeMessageResultKind Kind { get; private set; }

		/// <summary>
		///   Gets the result's message.
		/// </summary>
		public TMessage Message { get; private set; }
	}
}